<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
	<%@include file="/views/common/include/taglib.jsp"%>
	<%@include file="/views/common/include/head.jsp"%>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/table.css" />
	<script src="${ctx}/js/controllers/base/cellbuilding/CellBuildingEditController.js" type="text/javascript"></script>
<style type="text/css">
	   		select{
	   			padding-left: 8px;
    			font-size: 12px;
   				border-radius: 10px;
    			background-image: none;
    			margin-top:4px;
    			width:130px;
   				border: 1px solid #CBD5DD;
   				color:#8b8787;
   				font-family: "微软雅黑";
	   		}
	
	</style>
</head>
<body style="margin: 0px">
	<section class="mainborder">
       <section class="edit_scrollable padder">
         <div class="edit_content">
		<form id="myFrom">
			 <div class="form" >
			 <div class="item">
					<label class="col-sm-1 editlable">楼栋名：</label>
					<div class="fl">
				 <input id="cellBuildingId" type="hidden" value="${cellBuilding.id}">
						<input class="editform-control" id="buildingName" type="text" value="${cellBuilding.buildingName}"
						style="padding-left:9px;" onblur="checkBuildingName()" class="text" maxlength="15" placeholder="请输入楼栋名（最多15字）"/>
					<em class="emStyle">*</em></div>
				</div>
			    <div class="item">
					<input id="buildingCellId" type="hidden" value="${cellBuilding.cellId }">
		              <label class="col-sm-1 editlable">小区名：</label>
		                <div class="fl">
		                  <c:if test="${type == 1 }">
						  	<input id="cellid" class="editform-control" style="padding-left: 9px;" type="text" value="${sessionScope.user_login.currentCell.cellName}" readonly="readonly">
		                  </c:if>
		                  <c:if test="${type == 2 }">
		                  <input id="cellid" class="editform-control" type="text" style="padding-left: 9px;width:120px;" value="${cellBuilding.cellName}" readonly="readonly">
		                 </c:if>
		                 <em class="emStyle">*</em>
		           </div>
		       </div>
			   <div class="item">
					<input id="buildingRegionId" type="hidden" value="${cellBuilding.regionId }">
		              <label class="col-sm-1 editlable">区域名：</label>
		                <div class="fl">
		                  <select class="editform-control" onblur="checkRegionName()"  style="height:29px;width:120px;" id="regionid" required>
		                  <option value="">--区域--</option>
			              <c:forEach items="${cellRegions}" var="item" varStatus="cStatus">
						  <option value="${item.id}"  <c:if test="${item.id == buildingregionId}">selected="selected"</c:if>>${item.name}</option>
						  </c:forEach>
		                  </select>
		                  <em class="emStyle">*</em>
		           </div>
		       </div>	
				   <div class="item">
					<span class="col-sm-1 editlable">排序：</span>
					<div class="fl" style="width: 70px;">
					<input class="editform-control" id="sort" onblur="checkSort();" type="number" maxlength="50" style="width:60px" value="${cellBuilding.sort == null ? 1 : cellBuilding.sort}">
					</div><em class="emStyle">*</em>
				   </div>
					<div class="item">
					<span class="col-sm-1 editlable">备注：</span>
					<div class="fl">
					<input class="editform-control" id="memo" type="text" maxlength="100" value="${cellBuilding.memo}">
					</div>
				   </div>
			</div>
				</form>
			</div>

		</section>
	</section>
    	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
	</script>             
	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</body>
</html>
